package DataConstructureTest;

import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        Set<String> set = new HashSet<>();

        while (scanner.hasNextLine()) {

            String s = scanner.nextLine();
            String[] strings = s.split(" ");

            Collections.addAll(set, strings);
        }

        System.out.print(set.size());

    }

    public static int getFibNum (int n) {

        if (n <= 1) {
            return 1;
        } else {
            return getFibNum(n- 1) + getFibNum(n - 2);
        }

    }

    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();

        int iterator = 0;

        while (getFibNum(iterator) < N) {
            iterator++;
        }

        int steps1 = Math.abs(getFibNum(iterator) - N);
        int steps2 = Math.abs(getFibNum(iterator - 1) - N);

        System.out.print(Math.min(steps1, steps2));
    }

}
